<template>
    <div class="divc">
        <iframe srcdoc="" id="iframe" class="iframec" allowfullscreen="true" webkitallowfullscreen="true" mozallowfullscreen="true" oallowfullscreen="true" msallowfullscreen="true"></iframe>
    </div>
</template>
<style>
.divc {
    width: 100%;
    height: 100vh;
}

.iframec {
    width: 100%;
    height: 100vh;
}
</style>
<script>
export default {
    mounted() {
        // let formData = new FormData()
        // formData.append("entity", sessionStorage.getItem("program"))
        this.axios.post("/program/get_program",
            sessionStorage.getItem("program"),
            {
				"Content-type": "application/x-www-form-urlencoded"
			},
        ).then((res)=>{
                console.log("返回值：", res)
                let iframe = document.getElementById("iframe");
                iframe.setAttribute("srcdoc", res.data);
        },(err)=>{
				alert("获取文件失败")
				console.log(err)
		})
    }
}
</script>